﻿<%@ Page Language="C#" AutoEventWireup="true" Theme="Default" CodeBehind="LaiHanDYWJLB.aspx.cs" Inherits="Web.Pages.YongShui.LaiHanDYWJLB" %>


<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="../../../JS/AddEditCancel.js"></script>
    <script src="../../../JS/jquery-1.11.1.min.js"></script>
    <script defer="defer" src="../../../PageJS/wap.js"></script>
    <title>文件列表</title>
    <script type="text/javascript">

        function OpenWin(url) {
            window.open("/UpLoad/YJ/"+url, ''
        , 'left=0,top=0,resizable=1,toolbar=no,menubar=no,scrollbars=yes,status=no,location=no');
        }

        function openDY(bbid)
        {
            var lhbh = hdCollection.Get("lhbh");            
            var params = new Array();
            params.push("V_LAIHANBH:" + lhbh);
            wap.common.printjx('ZhangDanDY', [
                { key: 'QUERYPARAM', value: params.join("|") },
                { key: 'BAOBIAOID', value: bbid },
                { key: 'USERINFO', value: "csms" }
            ]);
            //openCenter("/Pages/YongShui/15.BaoBiaoGL/BaoBiaoView.aspx?baobiaoid=" + bbid + "&baobiaocs=V_LAIHANBH:" + lhbh, "1000px", "1000px");
        }

        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];
            var msg = arr[3].split('-');
            if (msg[0] == 'True') {
                alert(msg[1]);
            }
            hdCollection.Set("type", type);
            if (state == 'True') {
                if (type == "del") {
                    gvList.PerformCallback();
                }
            }
            else {

            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxLoadingPanel ID="ASPxLoadingPanel1" ClientInstanceName="loadpanel1" runat="server" ContainerElementID="gvList" Modal="true" Theme="Metropolis" ShowImage="false" Text="加载中"></dx:ASPxLoadingPanel>
        <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>--%>
               <div style="display: none;">
                    <dx:ASPxButton ID="btnActPerformExport" ClientInstanceName="btnActPerformExport" runat="server" Text="ASPxButton" UseSubmitBehavior="false"  OnClick="btnActPerformExport_Click"></dx:ASPxButton>
                </div>
                <dx:ASPxGridView ID="gvList" ClientInstanceName="gvList" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%" OnCustomCallback="gvList_CustomCallback">
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="序号" Width="35px" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                            <DataItemTemplate>
                                <%#Container.ItemIndex+1 %>
                            </DataItemTemplate>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="S_BAOBIAOMC" CellStyle-HorizontalAlign="Center" Caption="文件名称" HeaderStyle-HorizontalAlign="Left"></dx:GridViewDataTextColumn>                       
                        <dx:GridViewDataTextColumn Caption="" CellStyle-HorizontalAlign="Center" Width="40px">
                            <DataItemTemplate>
                               <a href='javascript:openDY(<%#Eval("I_BAOBIAOID") %>);'>预览</a>
                            </DataItemTemplate>
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowSort="false" />
                    <Settings VerticalScrollableHeight="250" VerticalScrollBarMode="Auto" />
                </dx:ASPxGridView>
            <%--</ContentTemplate>
        </asp:UpdatePanel>--%>
    </form>
</body>
</html>
